package org.creavi.engine.model;

import org.creavi.engine.model.builder.ModelInstanceBuilder;

public class ModelInstanceFactory {
	private ModelInstanceBuilder builder;

	public ModelInstanceBuilder getBuilder() {
		return builder;
	}

	public void setBuilder(ModelInstanceBuilder builder) {
		this.builder = builder;
	}

	public ModelInstance createModelInstance(String instanceName) {
		builder.createNewModelInstance(instanceName);
		builder.buildBasicModel();
		builder.enhanceModel();

		return builder.getModelInstance();
	}
}
